package com.lm.jol.example;

import org.openjdk.jol.info.GraphLayout;

public class JOLGraphExample {
    public static void main(String[] args) {
        Object[] array = new Object[10];

        // 填充数组，避免 null
        for (int i = 0; i < array.length; i++) {
            array[i] = new Object();
        }

        System.out.println(GraphLayout.parseInstance(array).toFootprint());
    }
}
